package com.icas.entity.databaseentity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.icas.enums.EndStatusEnum;
import lombok.Data;

/**
 * @Author: tocchen
 * @Date: 2022/4/19 12:29
 * @Description 学生的签到基本信息
 **/
@Data
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class StuAttend {
    private String stuId;
    private String stuName;
    private String status;


    /**
     * 通过{@link StuList}获取{@link StuAttend}实例
     * @param stuList 课程列表
     * @return
     */
    public static StuAttend StuListGetInstance(StuList stuList){

        StuAttend stuAttend = new StuAttend();

        stuAttend.setStuId(stuList.getStuId());
        stuAttend.setStuName(stuList.getStuName());
        stuAttend.setStatus(EndStatusEnum.attendances.ordinal()+"");

        return stuAttend;
    }
}
